package demo8;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) throws Exception{
        AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(Config.class);
        Peson person=context.getBean(Peson.class);
        Student student=context.getBean(Student.class);
        DButil dbutil=context.getBean(DButil.class);
        System.out.println(person);
        System.out.println(student);
        System.out.println(dbutil.getConnection());

    }
}
